package com.qiangesoft.wechat.core.service;

import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.mp.bean.kefu.WxMpKefuMessage;
import me.chanjar.weixin.mp.bean.result.WxMpMassSendResult;

import java.io.InputStream;
import java.util.List;

/**
 * 客服信息服务
 *
 * @author qiangesoft
 * @date 2023-09-07
 */
public interface IWxKefuMessageService {

    /**
     * 发送文本消息
     *
     * @param openId
     * @param content
     * @return
     * @throws WxErrorException
     */
    String sendTextMsg(String openId, String content) throws WxErrorException;

    /**
     * 发送图片消息
     *
     * @param openId
     * @param inputStream
     * @return
     * @throws WxErrorException
     */
    String sendImageMsg(String openId, InputStream inputStream) throws WxErrorException;

    /**
     * 发送图片消息
     *
     * @param openId
     * @param mediaId
     * @return
     * @throws WxErrorException
     */
    String sendImageMsg(String openId, String mediaId) throws WxErrorException;

    /**
     * 发送图文消息
     *
     * @param openId
     * @param articleList
     * @return
     */
    String sendNewsMsg(String openId, List<WxMpKefuMessage.WxArticle> articleList) throws WxErrorException;

    /**
     * 群发发送文本消息
     *
     * @param openIdList
     * @param content
     * @return
     * @throws WxErrorException
     */
    WxMpMassSendResult massSendTextMsg(List<String> openIdList, String content) throws WxErrorException;

    /**
     * 群发发送图片消息
     *
     * @param openIdList
     * @param inputStream
     * @return
     * @throws WxErrorException
     */
    WxMpMassSendResult massSendImageMsg(List<String> openIdList, InputStream inputStream) throws WxErrorException;

}
